package com.remind.integrate.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.remind.integrate.service.UserService;

@Controller
public class IndexController {

	@Autowired
	private UserService userService;
	
	@RequestMapping("/save")
	@ResponseBody
	public String save() {
		userService.save();
		return "Hello World! by save";
	}
	
	@RequestMapping("/saveException")
	@ResponseBody
	public String saveException() {
		try {
			userService.saveException();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return "Hello World! by saveException";
	}
}
